package com.learn.actionplatfo.Mapper;


import com.learn.actionplatfo.bean.Order;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface OrderMapper {
    /**
     * 根据订单号获取订单
     * @param orderId
     * @return
     */
    List<Order> getOrderById(int orderId);

    /**
     * 创建新订单,orderNo可以为空吗
     * @param order
     * @return
     */
    int addOrder(Order order);

    /**
     * 根据上架id和购买id查询订单
     * @param id
     * @return
     */
    List<Order> getOrderByUpUptUserOrBuyUser(int id);
}
